using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class forums_admin_users : System.Web.UI.UserControl
{
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        gridUsers.DataSource = DAL.Users.GetByUsernameLike(txtUsername.Text);
        gridUsers.DataBind();
        mviewUsers.SetActiveView(viewList);
    }
    protected void btnBack_Click(object sender, EventArgs e)
    {
        mviewUsers.SetActiveView(viewList);
    }

    protected void SelectUser(object sender, CommandEventArgs e)
    {
        long userID;
        if (Int64.TryParse(e.CommandArgument.ToString(), out userID))
        {
            ModifyUser1.CurrentUser = DAL.Users.Item(userID);
        }
        else
        {
            ModifyUser1.CurrentUser = null;
        }

        mviewUsers.SetActiveView(viewUser);
    }
    protected void btnHelp_Click(object sender, EventArgs e)
    {
        pnlSearchTips.Visible = !pnlSearchTips.Visible;
    }
}
